<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML>
<HEAD>
	<TITLE>eSurvey - Recuperaci&oacute;n de contrase&ntilde;a</TITLE>
	<LINK href="styles/general.css" type="text/css" rel="stylesheet">
	<LINK href="styles/rescurePassword.css" type="text/css" rel="stylesheet">
	<SCRIPT src="jquery/jquery.js" type="text/javascript"></SCRIPT>
	<SCRIPT src="js/global.js" type="text/javascript"></SCRIPT>
	<SCRIPT src="js/rescurePassword.js" type="text/javascript"></SCRIPT>
</HEAD>
<BODY onload="javascript: checkURLSecretQuestion();">
	<%
		if ((session.getAttribute("login")!=null) && (session.getAttribute("secretQuestion")!=null)){
	%>
	<DIV id="general">
		<DIV id="header">
			<%@ include file="header.jsp" %>
		</DIV>
		<DIV id="content">
			<DIV id="main">
				<H1>Recuperaci&oacute;n de contrase&ntilde;a</H1>
				<FORM action="setPassword.jsp" onsubmit="return checkFormSecretQuestion();" method="POST">
					<UL>
						<LI class="info">
							A continuaci&oacute;n, responda a su pregunta secreta e inserte una nueva contrase&ntilde;a. Una vez finalizado,
							deber&aacute; acceder al enlace que se le enviar&aacute; a su correo electr&oacute;nico para poder acceder de nuevo a la aplicaci&oacute;n.
						</LI>
						<LI>
							<DIV id="warning"></DIV>
						</LI>
						<LI>
							<DIV id="divSecretQuestion">
								<LABEL id="lblSecretQuestion" class="label" for="secretQuestion">
									Pregunta secreta:
								</LABEL>
								<LABEL id="lblSecretQuestionValue" class="label secretQuestion" for="secretQuestion">
									<%= session.getAttribute("secretQuestion") %>
								</LABEL>
							</DIV>
						</LI>
						<LI>
							<DIV id="divSecretAnswer">
								<LABEL id="lblSecretAnswer" class="label" for="secretAnswer">
									Respuesta: <SPAN class="req">*</SPAN>
								</LABEL>
								<INPUT type="text" id="secretAnswer" name="secretAnswer" class="textfieldMedium" tabindex="1">
							</DIV>
						</LI>
						<LI>
							<DIV id="divPass">
								<LABEL id="lblPass" class="label" for="pass">
									Nueva contrase&ntilde;a: <SPAN class="req">*</SPAN>
								</LABEL>
								<INPUT id="pass" name="pass" type="password" class="textfieldMedium" tabindex="2">
							</DIV>
						</LI>
						<LI>
							<DIV id="divPassConfirm">
								<LABEL id="lblPassConfirm" class="label" for="passConfirm">
									Confirme su nueva contrase&ntilde;a: <SPAN class="req">*</SPAN>
								</LABEL>
								<INPUT id="passConfirm" name="passConfirm" type="password" class="textfieldMedium" tabindex="3">
							</DIV>
						</LI>
						<LI class="botones">
							<DIV id="divFormButtons">
								<input type="submit" value="Aceptar" tabindex="4" class="button" >
								<A href="index.jsp"><INPUT type="button" value="Cancelar" tabindex="5" class="button"></A>
							</DIV>
						</LI>
					</UL>
				</FORM>
			</DIV>
			<DIV id="nav">
				<DIV class="tabs">
					<% if (session.getAttribute("kind") == "user") { %>
						<%@ include file="pollsterTabs.html" %>
					<% } else if (session.getAttribute("kind") == "admin") { %>
						<%@ include file="adminTabs.html" %>
					<% } else { %>
						<%@ include file="mainTabs.html" %>
					<% } %>
				</DIV>
			</DIV>
		</DIV>
		<DIV id="footer">
			<%@ include file="footer.jsp" %>
		</DIV>
	</DIV>
	<%
		} else {
			response.sendRedirect("login.jsp");
		}
	%>
</BODY>
</HTML>
